package com.ruoyi.framework.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * Apple登录配置
 *
 * @author ruoyi
 */
@Component
@ConfigurationProperties(prefix = "apple.login")
public class AppleLoginConfig
{
    /**
     * 是否启用Apple登录
     */
    private boolean enabled = true;

    /**
     * Apple团队ID
     */
    private String teamId;

    /**
     * Apple客户端ID (Bundle Identifier)
     */
    private String clientId;

    /**
     * Apple Key ID
     */
    private String keyId;

    /**
     * Apple私钥文件路径
     */
    private String privateKeyPath;

    /**
     * 访问token过期时间(秒)
     */
    private long accessTokenExpire = 3600;

    /**
     * 刷新token过期时间(秒)
     */
    private long refreshTokenExpire = 2592000; // 30天

    /**
     * Apple用户默认角色ID
     */
    private Long defaultRoleId = 4L;

    /**
     * Apple用户默认部门ID
     */
    private Long defaultDeptId = 103L;

    public boolean isEnabled()
    {
        return enabled;
    }

    public void setEnabled(boolean enabled)
    {
        this.enabled = enabled;
    }

    public String getTeamId()
    {
        return teamId;
    }

    public void setTeamId(String teamId)
    {
        this.teamId = teamId;
    }

    public String getClientId()
    {
        return clientId;
    }

    public void setClientId(String clientId)
    {
        this.clientId = clientId;
    }

    public String getKeyId()
    {
        return keyId;
    }

    public void setKeyId(String keyId)
    {
        this.keyId = keyId;
    }

    public String getPrivateKeyPath()
    {
        return privateKeyPath;
    }

    public void setPrivateKeyPath(String privateKeyPath)
    {
        this.privateKeyPath = privateKeyPath;
    }

    public long getAccessTokenExpire()
    {
        return accessTokenExpire;
    }

    public void setAccessTokenExpire(long accessTokenExpire)
    {
        this.accessTokenExpire = accessTokenExpire;
    }

    public long getRefreshTokenExpire()
    {
        return refreshTokenExpire;
    }

    public void setRefreshTokenExpire(long refreshTokenExpire)
    {
        this.refreshTokenExpire = refreshTokenExpire;
    }

    public Long getDefaultRoleId()
    {
        return defaultRoleId;
    }

    public void setDefaultRoleId(Long defaultRoleId)
    {
        this.defaultRoleId = defaultRoleId;
    }

    public Long getDefaultDeptId()
    {
        return defaultDeptId;
    }

    public void setDefaultDeptId(Long defaultDeptId)
    {
        this.defaultDeptId = defaultDeptId;
    }
}